// run: $exec > input
#include <iostream>
#include <ctime>
#include <set>
#include <cstdlib>

std::set<int> s;

int main()
{
	std::srand(std::time(0));
	int const up = 1000;
	long long n = 1000, k = 1000;
	std::cout << n << " " << k << "\n";
	for (int i = 0; i < n; i++) {
		std::cout << rand() % up + 1 << " ";
	}
}

